<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@include file="../common/head.jsp"%>

<div class="right">
        <div class="location">
            <strong>你现在所在的位置是:</strong>
            <span>订单管理页面 >> 订单修改页面</span>
        </div>
        <div class="providerAdd">
          <form:form modelAttribute="bill" id="billForm" name="billForm" method="post" action="doModif">
				<input type="hidden" name="method" value="modifysave">
				<input type="hidden" name="id" value="${requestScope.bill.id }">
                <!--div的class 为error是验证错误，ok是验证成功-->
                <div class="">
                    <label for="billCode">订单编码：</label>
                    <input type="text" name="billCode" id="billCode" value="${requestScope.bill.billCode }" readonly="readonly">
                    <font color="red"><form:errors path="billCode"/></font>
                </div>
                <div>
                    <label for="productName">商品名称：</label>
                    <input type="text" name="productName" id="productName" value="${requestScope.bill.productName }">
					<font color="red"><form:errors path="productName"/></font>
                </div>
                <div>
                    <label for="productUnit">商品单位：</label>
                    <input type="text" name="productUnit" id="productUnit" value="${requestScope.bill.productUnit }">
					<font color="red"><form:errors path="productUnit"/></font>
                </div>
                <div>
                    <label for="productCount">商品数量：</label>
                    <input type="text" name="productCount" id="productCount" value="${requestScope.bill.productCount }">
					<font color="red"></font>
                </div>
                <div>
                    <label for="totalPrice">总金额：</label>
                    <input type="text" name="totalPrice" id="totalPrice" value="${requestScope.bill.totalPrice }">
					<font color="red"></font>
                </div>
                <div>
                    <label for="providerId">供应商：</label>
                    <input type="hidden" value="${requestScope.bill.providerId }" id="pid" />
					<select name="providerId" id="providerId">
                        <option value="${requestScope.bill.providerId}">--${requestScope.bill.provider.proName}--</option>
                        <c:if test="${providerList != null}">
                            <c:forEach items="${providerList}" var="provider">
                                <c:if test="${providerId == provider.id}">
                                    <option value="${provider.id}" selected="selected">${provider.proName}</option>
                                </c:if>
                                <option value="${provider.id}">${provider.proName}</option>
                            </c:forEach>
                        </c:if>
		        	</select>
					<font color="red">
<%--                        <img src="/images/y.png">--%>
                    </font>
                </div>
                <div>
                    <label >是否付款：</label>
                        <c:if test="${requestScope.bill.isPayment == 1}">
                            <input type="radio" name="isPayment" value="1" checked="checked">未付款
                            <input type="radio" name="isPayment" value="2">已付款
                        </c:if>
                        <c:if test="${requestScope.bill.isPayment == 2}">
                            <input type="radio" name="isPayment" value="1">未付款
                            <input type="radio" name="isPayment" value="2" checked="checked">已付款
                        </c:if>
                </div>
                <div class="providerAddBtn">
                  <input type="submit" name="save" id="save" value="保存" style="line-height: 17px">
				  <input type="button" id="back" name="back" onclick="history.go(-1)" value="返回" >
              	</div>
            </form:form>
        </div>
    </div>
</section>

<%@include file="../common/foot.jsp" %>
<%--<script type="text/javascript" src="/js/billmodify.js"></script>--%>